
package com.etop.beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * 活动表
 * @author Lin Duxiang
 */
@Entity                             // Hibernate的映射，映射到数据库
@Table(name="activity")             
public class Activity implements Serializable {
    private int id;//编号
    private String name;//活动名字
    private Date s_time;//活动开始时间
    private Date e_time;//活动结束时间
    private String description;//活动描述
    private int isAdded;//代表该用户是否已经参加了活动,1为参加，0为没有参加

    public Activity() {
    }

    public Activity(int id, String name, Date s_time, Date e_time, String description) {
        this.id = id;
        this.name = name;
        this.s_time = s_time;
        this.e_time = e_time;
        this.description = description;
        this.isAdded = 0;
    }
    
    @Id
    @GeneratedValue //表示自增
    public int getId() {
        return id;
    }
    
    /**
     * @param id 
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name 
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the s_time 
     */
    public Date getS_time() {
        return s_time;
    }
    /**
     * @param s_time 
     */
    public void setS_time(Date s_time) {
        this.s_time = s_time;
    }
    /**
     * @return e_time 
     */
    public Date getE_time() {
        return e_time;
    }
    /**
     * @param e_time 
     */
    public void setE_time(Date e_time) {
        this.e_time = e_time;
    }
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    /**
     * @param description 
     */
    public void setDescription(String description) {
        this.description = description;
    }

    @Transient
    public int getIsAdded() {
        return isAdded;
    }

    public void setIsAdded(int isAdded) {
        this.isAdded = isAdded;
    }
}
